<template>
  <div id="app">
    <!-- 路由出口 -->
    <!-- 路由缓存 -->
    <keep-alive include="find">
      <router-view></router-view>
    </keep-alive>
    <!-- 底部导航栏 -->

    <van-tabbar
      v-model="active"
      active-color="#90f"
      @change="onChange"
      router
      placeholder
    >
      <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
      <van-tabbar-item icon="search" to="/find" badge="5">搜索</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0
    };
  },
  methods: {
    onChange() {
      // console.log(this.active);
    }
  }
};
</script>

<style lang="less"></style>
